//登录
Package("web.module.login");
web.module.login={
		userNameKeyDown:function(evt){			
			 if(window.event) evt = window.event;
			    if(evt.keyCode == 13){
			    	web.module.login.validate();
			    	$("input[name='password']").focus();
			    };
		},
		userNameKeyUp:function(){
			/* if($("input[name='userName']").val().length  >= 6){
				 $("input[name='password']").focus();
			 }*/
		},
		passwordKeyDown:function(evt){
			if(window.event) evt = window.event;
		    if(evt.keyCode == 13){
		    	web.module.login.validate();
		    };
		},
		validate:function(){
			var userName = $("#userName");
			var validateMessage = $("#errorDiv");
			if(null == userName.val() || "" == userName.val() || "用户名" == userName.val()){
				$("#errorDiv").show()
				validateMessage.html("请输入账号!");
				userName.focus();
				return false;
			}
			/*var password = $("#password");
			if(null == password.val() || "" == password.val() || "密码" == password.val()){
 	        $("#errorDiv").show()
				validateMessage.html("请输入密码!");
				password.focus();
				return false;
			}*/
		}
}